//
//  EEGTabBarView.m
//  EEGmusic
//
//  Created by jimmyding on 06/12/2010.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "QuanziTabBarView.h"


@implementation QuanziTabBarView


- (id)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code.
    }
    return self;
}



//Let the delegate know that a tab has been touched
-(IBAction) touchButton:(id)sender {
    if( self.delegate != nil && [self.delegate respondsToSelector:@selector(tabWasSelected:)]) {
		self.homeButton.selected = NO;
		self.togetherButton.selected = NO;
		self.memberButton.selected = NO;
		self.infoButton.selected = NO;
		((UIButton *)sender).selected = YES;
		self.selectedButton = (UIButton *)sender;
		[self.delegate tabWasSelected:self.selectedButton.tag];
    }
}

- (void)dealloc {
    _delegate=nil;
}

@end
